<template>
	<view class="password">
		<view class="title">请输入交易密码</view>
		<view class="desc">请在此处填写用于交易的6位密码。</view>
		<u-message-input :maxlength="6" focus dot-fill @change="change"></u-message-input>
		<view class="submit" @click="submit">确定</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: ""
			}
		},
		methods: {
			change(value) {
				this.value = value;
			},
			submit() {
				this.$emit("submit", this.value);
			}
		}
	}
</script>

<style scoped lang="scss">
	.password {
		padding: 30rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: center;

		.title {
			color: #2A2A2A;
			font-size: 32rpx;
			font-weight: bold;
		}

		.desc {
			color: #787878;
			font-size: 24rpx;
			margin: 44rpx 0;
		}

		/deep/ .u-char-item {
			border-radius: 20rpx;
			background-color: #F0FBF3;
			border-color: #D1F1DA !important;
		}

		.submit {
			width: 270rpx;
			height: 80rpx;
			color: #6BD288;
			font-size: 28rpx;
			border-radius: 10rpx;
			margin-top: 44rpx;
			border: 1px solid #6BD288;
			display: flex;
			justify-content: center;
			align-items: center;
		}
	}
</style>
